import axios from 'axios'

export const listNotice = (current, size, noticeVo) => {
  return axios({
    url: '/api/notice/findNoticePage',
    method: 'post',
    /*localhost:8080/user?id=  方式传值*/
    params: {
      current,
      size
    },
    /*json数据传值*/
    data: noticeVo
  })
}

//查询通知
export const getNoticeById = (noticeId) => {
  return axios({
    url: '/api/notice/getNoticeById',
    method: 'get',
    /*localhost:8080/user?id=  方式传值*/
    params: {
      noticeId
    },
  })
}

//添加通知
export const addNotice = (notice) => {
  return axios({
    url: '/api/notice/addNotice',
    method: 'post',
    data: notice
  })
}

//修改通知
export const updateNotice = (notice) => {
  return axios({
    url: '/api/notice/updateNotice',
    method: 'post',
    data: notice
  })
}

//批量删除通知
export const delNotice = (ids) => {
  return axios({
    url: '/api/notice/deleteNotice',
    method: 'delete',
    params: {
      ids
    },
  })
}

